<?php /*a:3:{s:48:"D:\phpstudy_pro\WWW\night\app\view\node\add.html";i:1602419174;s:53:"D:\phpstudy_pro\WWW\night\app\view\public\header.html";i:1602463826;s:53:"D:\phpstudy_pro\WWW\night\app\view\public\footer.html";i:1601179064;}*/ ?>
<header>
    <title>节点<?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): ?>修改<?php else: ?>添加<?php endif; ?></title>
</header>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <script src="/static/layui/layui.js"></script>
    <script src="/static/jquery.min.js"></script>
</head>
<body class="layui-layout-body">

<div class="layui-layout layui-layout-admin">

    <div class="layui-header">
        <div class="layui-logo">商品后台管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="/index/welcome">首页</a></li>
<!--            <li class="layui-nav-item"><a href="/node/add">节点添加</a></li>-->
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    <?php echo htmlentities($user['admin_name']); ?>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/admin/LoginOut">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <?php foreach($node_list as $key=>$vo): ?>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;"><?php echo htmlentities($vo['node_name']); ?></a>
                    <dl class="layui-nav-child">

                        <?php foreach($vo['node'] as $k=>$v): ?>
                        <dd><a href="<?php echo htmlentities($v['node_url']); ?>"><?php echo htmlentities($v['node_name']); ?></a></dd>
                        <?php endforeach; ?>
                    </dl>
                </li>
                <?php endforeach; ?>
<!--                <li class="layui-nav-item">-->
<!--                    <a href="javascript:;">解决方案</a>-->
<!--                    <dl class="layui-nav-child">-->
<!--                        <dd><a href="javascript:;">列表一</a></dd>-->
<!--                        <dd><a href="javascript:;">列表二</a></dd>-->
<!--                        <dd><a href="">超链接</a></dd>-->
<!--                    </dl>-->
<!--                </li>-->
<!--                <li class="layui-nav-item"><a href="">云市场</a></li>-->
<!--                <li class="layui-nav-item"><a href="">发布商品</a></li>-->
            </ul>
        </div>
    </div>

    <div class="layui-body">
<!-- 内容主体区域 -->
<br />
<div style="padding: 15px;">

    <form class="layui-form" action="add" method="post">
        <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): ?><input type="hidden" name="id" value="<?php echo htmlentities($info['id']); ?>"><?php endif; ?>

        <div class="layui-form-item">
            <label class="layui-form-label">权限名称：</label>
            <div class="layui-input-block">
                <input type="text" style="width: 240px;" <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): ?>value="<?php echo htmlentities($info['node_name']); ?>"<?php endif; ?>  name="node_name" required  lay-verify="required" placeholder="请输入权限名" autocomplete="off" class="layui-input">
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">权限URL</label>
            <div class="layui-input-inline">
                <input type="text" name="c_name" <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): ?>value="<?php echo htmlentities($info['c']); ?>"<?php endif; ?> required lay-verify="required" placeholder="请输入控制器名" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" name="a_name" <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): ?>value="<?php echo htmlentities($info['a']); ?>"<?php endif; ?> required lay-verify="required" placeholder="请输入方法名" autocomplete="off" class="layui-input">
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">父级权限：</label>
            <input type="radio" name="partent_level" title="顶级分类" value="0/1" <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): if($info['node_partent']==0): ?>checked<?php endif; ?><?php endif; ?> >
            <br /><hr class="layui-bg-red">
            <div class="layui-input-block">
                <?php foreach($list as $key=>$vo): ?>
                <label class="layui-form-label">二级分类：</label><br>
                    <input type="radio" name="partent_level" title="<?php echo htmlentities($vo['node_name']); ?>"  value="<?php echo htmlentities($vo['id']); ?>/2" <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): if($info['node_partent']==$vo['id']): ?>checked<?php endif; ?><?php endif; ?> > &nbsp<br>
                <label class="layui-form-label">三级分类：</label><br>
                    <?php foreach($vo['children'] as $k=>$v): ?>
                        <input type="radio" name="partent_level" title="<?php echo htmlentities($v['node_name']); ?>" value="<?php echo htmlentities($v['id']); ?>/3"  <?php if(!(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty()))): if($info['node_partent']==$v['id']): ?>checked<?php endif; ?><?php endif; ?>>
                    <?php endforeach; ?>
                <hr class="layui-bg-orange">

                <?php endforeach; ?>
            </div>
        </div>

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">状态</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="radio" name="status" value="0" title="启用"  checked>-->
<!--                <input type="radio" name="status" value="1" title="未启用">-->
<!--            </div>-->
<!--        </div>-->

<!--        &nbsp; &nbsp; &nbsp; &nbsp;等级：<div class="layui-input-inline">-->
<!--           <select name="node_grade">-->
<!--                <option value="1">顶级分类</option>-->
<!--                <option value="2">二级分类</option>-->
<!--                <option value="3">三级分类</option>-->
<!--            </select>-->
<!--        </div>-->
        <div class="layui-form-item layui-form-text">
        </div>
        <br>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

    <script>
        //Demo
        layui.use('form', function(){
            var form = layui.form;

            //监听提交
            /*form.on('submit(formDemo)', function(data){
                layer.msg(JSON.stringify(data.field));
                return false;
            });*/
        });
    </script>
    
</div>
</div>

<!--<div class="layui-footer">-->
<!--    &lt;!&ndash; 底部固定区域 &ndash;&gt;-->
<!--    © layui.com - 底部固定区域-->
<!--</div>-->
</div>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
</body>
</html>